package com.xu.blog_after_end.dao;

import com.xu.blog_after_end.po.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface UserRepository extends JpaRepository<User,Long> {
    User findByUsernameAndPassword(String username,String password);  // 根据用户名和密码查询数据库
    @Query("SELECT u FROM User u ORDER BY u.id ASC")
    User findFirstByOrderByIdAsc();
}
